﻿<!--#include virtual="/Common/Config.asp" -->
<!--#include virtual="/Common/conn.asp" -->
<!--#include virtual="/2010admin/Check_IsLogin.asp" -->
<!--#include virtual="/Common/Function.asp" -->
<!--#include file="Admin_Menu_Inc.asp" -->
<%

If Request.ServerVariables ("Request_Method")="POST" Then

	'禁止从网站外部提交数据
	Call Deny_OutSiteSubit()

	Desc_ID_Str = reform("RightList")
	
	If Desc_ID_Str = "" Then 	AlertBox "请选择菜单项！","Admin_Menu_Query.asp"

	Desc_ID_Arr = Split(Desc_ID_Str,",")
	j=1
	For i =0 To UBound(Desc_ID_Arr)
		Conn.execute("UPDATE Admin_Menu SET Menu_Order = "& j  &" WHERE MenuID="&Trim(Desc_ID_Arr(i)))
		j = j + 1
	Next

End If

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="/2010admin/css/default.css" type="text/css" rel="stylesheet">
<title><%=web_title%></title>
<script language="javascript" src="/js/jquery.js"></script>
<script language="javascript" src="/2010admin/js/function.js"></script>
</head>
<body>
<table border="0" width="100%" cellSpacing="0" cellPadding="0">
  <tr>
    <td width="100%" height="5"></td>
  </tr>
  <tr>
    <td width="100%" align="center">
      <table border="0" width="98%" cellSpacing="0" cellPadding="0">
        <tr>
          <td width="*" align="center" valign="top">
            <table border="0" width="100%" cellSpacing="0" cellPadding="0" class="lrbtline">
              <tr>
                <td width="100%" height="25" class="tbtop">管理导航</td>
              </tr>
              <tr>
                <td width="100%" align="center">
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="20">&nbsp;<img src="/2010admin/images/sico.gif" border="0">&nbsp;<span id="userlist"><a href="Admin_Menu_Query.asp">菜单列表</a></span>&nbsp;<img src="/2010admin/images/sico.gif" border="0">&nbsp;<span id="useradd"><a href="Admin_Menu_Add.asp">增加新的菜单</a></span></td>
                    </tr>
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table border="0" width="100%" cellSpacing="0" cellPadding="0">
              <tr>
                <td width="100%" height="5"></td>
              </tr>
            </table>
            <table border="0" width="100%" cellSpacing="0" cellPadding="0" class="lrbtline">
              <tr>
                <td width="100%" height="25" class="tbtop">菜单排序</td>
              </tr>
              <tr>
                <td width="100%" align="center">
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                  <form name="form" method="post" action="" onSubmit="return checkform();">
                    <tr>
                      <td height="25">&nbsp;</td>
                      <td>原顺序</td>
                      <td align="center">&nbsp;</td>
                      <td>新顺序</td>
                    </tr>
                    <tr>
                      <td width="44" height="25">&nbsp;</td>
                      <td width="110">
					  <select name="LeftList" size=10 multiple style="width:120;">
					   <%
					   Set rs = conn.EXECUTE("SELECT MenuID,MenuName FROM Admin_Menu WHERE ParentID=0 AND MenuVisibled=1 ORDER BY Menu_Order ASC ")
					   Do While Not rs.Eof

					   %>
						<option value="<%=rs(0)%>"><%=rs(1)%></option>
					   <%
					   rs.MoveNext
					   Loop
					   rs.close
					   %>
					  </select>
					  </td>
                    <td width="87" align="center"><p>
                     <input type="button" name="btnAdd" onClick="if(document.form.LeftList.value!=''){AddToRight();}" value=" >> ">
                    </p>
                      <p>
                       <input type="button" name="btnDel" onClick="if(document.form.RightList.value!=''){DelFromRight();}" value=" << ">         
                            </p></td>
                      <td width="972"><select name="RightList" size="10" multiple style="width:120;">
                    </select></td>
                    </tr>

                    <tr>
                      <td height="25"></td>
                      <td colspan="3">&nbsp;</td>
                    </tr>
                    <tr>
                      <td height="25"></td>
                      <td>&nbsp;</td>
                    <td><input type="submit" name="submit1" value="提交" class="button" ></td>
                      <td>&nbsp;</td>
                    </tr>
                  </form>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="100%" height="5"></td>
  </tr>
</table>
</body>
</html>
<%
Call conn_close()
%>




